<?php
/*
 * Database initialization.
 * uses: DB_HOST, DB_NAME, DB_USER_NAME, DB_PASSWORD
 */

$link = new mysqli(DB_HOST, DB_USER_NAME, DB_PASSWORD, DB_NAME);
$database = new db\MysqlDatabase($link);
Db::setDatabase($database);

Db::query('SET CHARACTER SET utf8');
Db::query('SET collation_connection = utf8_general_ci');